# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        Young  
# Name:         demo0931
# Description:  异常捕捉
# Author:       $赵怡蕾
# Date:         2019/3/20
#-------------------------------------------------------------------------------

num = 100
a_list = [2,23,45,'p',0,10]
def chfa(*args):
    for item in args:
        print(num * item)
        print(num / item)    # 除法遇到'p'的时候会出现异常

if __name__ == '__main__':
    try:
        chfa(*a_list)
    except Exception as e:
        print('Exception',e)
    except:
        print('未知异常')
    # 后面的语句可以执行
    print('列表为',a_list)